package com.yonyou.isv.demo.openapi.api.position;

import com.yonyou.isv.demo.openapi.base.module.reponse.ApiDataResponse;
import com.yonyou.isv.demo.openapi.api.BaseOpenApi;
import com.yonyou.isv.demo.openapi.api.OpenApiURL;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @description: 用友开放平台职位接口
 * @author: zpp
 * @create: 2021-07-19
 **/
@Component
public class PositionApi extends BaseOpenApi {
    public Map<String, Object> save(Map<String, Object> params) {
        ApiDataResponse apiDataResponse =  postForEntity(OpenApiURL.POSITION_SAVE,params, ApiDataResponse.class);
        return getData(apiDataResponse);
    }
    public Map<String, Object> list(Map<String, Object> params) {
        ApiDataResponse apiDataResponse =  postForEntity(OpenApiURL.POSITION_LIST,params, ApiDataResponse.class);
        return getData(apiDataResponse);
    }
    public Map<String,Object> detail(Map<String,String> params)
    {
        ApiDataResponse apiDataResponse = getForEntity(OpenApiURL.POSITION_DETAIL, params, ApiDataResponse.class);
        return getData(apiDataResponse);
    }

}
